package com.example.mymvp.presenter;

import com.example.mymvp.Start;
import com.example.mymvp.View.StartVIew;
import com.example.mymvp.model.IBaseModel;
import com.example.mymvp.model.SratModel;

import java.util.List;

public class StartPresenter {
    StartVIew startVIew;
    SratModel sratModel;

    public StartPresenter(StartVIew VIew) {
        this.sratModel =new SratModel();
        this.startVIew = VIew;
    }
    public void fetch(){
        this.sratModel.getStartList(new IBaseModel.OnLoaderListenter() {
            @Override
            public void onComplete(List<Start> startList) {
                startVIew.showsatartlist(startList);
            }

            @Override
            public void onError(String err) {
                startVIew.showerr(err);
            }
        });
    }
}
